/*package com.utils.spring;

import static com.jayway.restassured.RestAssured.given;
import static org.junit.runners.MethodSorters.NAME_ASCENDING;

import com.alibaba.fastjson.JSONObject;
import com.jayway.restassured.http.ContentType;
import com.jayway.restassured.response.Headers;
import com.jayway.restassured.response.Response;
import com.kyhd.cpa.controller.model.CreateChannelBillRequest;
import com.kyhd.cpa.controller.model.CreateCustomerBillRequest;
import com.kyhd.cpa.controller.model.QuickCreateChannelBillRequest;
import com.kyhd.cpa.controller.model.QuickCreateCustomerBillRequest;
import com.kyhd.cpa.controller.model.ReisterRequest;
import com.kyhd.cpa.controller.model.UpdatePackagePriceRequest;
import com.kyhd.cpa.util.InitConst;
import com.kyhd.lib.util.AESUtils;
import com.kyhd.lib.util.Constants;

import java.io.File;
import java.io.IOException;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.hamcrest.core.Is;
import org.hamcrest.core.IsEqual;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.test.context.ActiveProfiles;

@ActiveProfiles("test")
@org.junit.FixMethodOrder(NAME_ASCENDING)
public class ChannelProductControllerTest extends AbstractApiIntegrationTest {

    @Before
    public void setUp() throws IOException {
        super.setUp();
    }



    @After
    public void tearDown() {
    	
    }
    
   
    
    public void testGetMyChannel(){
    	
    	String _info = 18+"#@#"+100+"#@#"+"K001,k002";
//    	String cookie = AESUtils.AESEncode(_info);
    	String cookie = "cZg2+xyWmGsiCJsLoxUGgPBQGI33e193oEoDCfg8tr8=";
    	
    	given().contentType(ContentType.JSON).cookie("USER_INFO",cookie)
    	.when().get("/cpa/api/channel/get_my_channel").prettyPrint();
    	
//    	given().contentType(ContentType.JSON).cookie("USER_INFO",cookie)
//    	.when().get("/cpa/api/channel/get?id=1").prettyPrint();
    }

    
    public void testUpdatePackagePrice(){
    	
    	UpdatePackagePriceRequest request = new UpdatePackagePriceRequest();
    	request.getChannelProductCode().add("E034002002K009");
//    	request.getCustomerProductCode().add("E029001010K037");
    	request.setDatetime("2017-12-01");
    	request.setPrices(1.2);
    	
    		given().contentType(ContentType.JSON).cookie("USER_LOGIN","16").body(request)
    	.when().post("/cpa/api/channel_product/update_package_price").prettyPrint();
    	    	
    }
   
    
    public void testListPackage(){
    	Map<String,String> params = new HashMap<String,String>();
    	params.put("type","2");
    	params.put("code", "E029001");
    	params.put("channelCode","K037");
    	params.put("datetime","2018-01-12");
    	params.put("offset","1");
    	params.put("limit","100");
    	
    	given().contentType(ContentType.JSON).cookie("USER_LOGIN","16").params(params)
    	.when().get("/cpa/api/channel_product/list_package").prettyPrint();
    	    	
    }
    
    
    
    
    public void testListCustomer(){
    	Map<String,String> params = new HashMap<String,String>();
    	
    	params.put("channelCode","K037");
    	
    	
    	given().contentType(ContentType.JSON).cookie("USER_LOGIN","16").params(params)
    	.when().get("/cpa/api/channel_product/list_customer").prettyPrint();
    	    	
    }
    
    
    
    public void testListProduct(){
    	Map<String,String> params = new HashMap<String,String>();
    	
    	params.put("channelCode","K037");
    	params.put("customerCode","E012");
    	
    	
    	given().contentType(ContentType.JSON).cookie("USER_LOGIN","16").params(params)
    	.when().get("/cpa/api/channel_product/list_product").prettyPrint();
    	    	
    }
    
    

    

}
*/